﻿using System.Data;
using EFMetaProvider;
using EFProviderWrapperToolkit;

namespace MetaProviderTest
{
	public class CTAdminEntitiesWithWrappers : CTAdminEntities
    {
        public CTAdminEntitiesWithWrappers(): this("name=CTAdminEntities")
        {
        }

        public CTAdminEntitiesWithWrappers(string connectionString)
            : base(EntityConnectionWrapperUtils.CreateEntityConnectionWithWrappers(
                    connectionString,
                    "EFMetaProvider"
            ))
        {
        }

		public ColumnMetadata[] LastMetadata
		{
			get { return MetaConnection.Metadata; }
		}

        private EFMetaConnection MetaConnection
        {
            get { return this.UnwrapConnection<EFMetaConnection>(); }
        }

    }
}